home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Beta / Quicktime 2.0 Beta.iso / Programming Stuff / Interfaces / Universal Interfaces / FixMath.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-03  |  2.5 KB  |  98 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        FixMath.h
  3.  
  4.     Copyright:    © 1984-1993 by Apple Computer, Inc., all rights reserved.
  5.  
  6.     WARNING
  7.     This file was auto generated by the interfacer tool. Modifications
  8.     must be made to the master file.
  9.  
  10. */
  11.  
  12. #ifndef __FIXMATH__
  13. #define __FIXMATH__
  14.  
  15. #ifndef __TYPES__
  16. #include <Types.h>
  17. /*    #include <ConditionalMacros.h>                                */
  18. /*    #include <MixedMode.h>                                        */
  19. /*        #include <Traps.h>                                        */
  20. #endif
  21.  
  22. enum  {
  23.     fixed1                        = (long)0x00010000,
  24.     fract1                        = (long)0x40000000,
  25.     positiveInfinity            = (long)0x7FFFFFFF,
  26.     negativeInfinity            = (long)0x80000000
  27. };
  28.  
  29. #ifdef __cplusplus
  30. extern "C" {
  31. #endif
  32.  
  33. extern pascal Fract Fix2Frac(Fixed x)
  34.  ONEWORDINLINE(0xA841);
  35. extern pascal long Fix2Long(Fixed x)
  36.  ONEWORDINLINE(0xA840);
  37. extern pascal Fixed Long2Fix(long x)
  38.  ONEWORDINLINE(0xA83F);
  39. extern pascal Fixed Frac2Fix(Fract x)
  40.  ONEWORDINLINE(0xA842);
  41. extern pascal Fract FracMul(Fract x, Fract y)
  42.  ONEWORDINLINE(0xA84A);
  43. extern pascal Fixed FixDiv(Fixed x, Fixed y)
  44.  ONEWORDINLINE(0xA84D);
  45. extern pascal Fract FracDiv(Fract x, Fract y)
  46.  ONEWORDINLINE(0xA84B);
  47. extern pascal Fract FracSqrt(Fract x)
  48.  ONEWORDINLINE(0xA849);
  49. extern pascal Fract FracSin(Fixed x)
  50.  ONEWORDINLINE(0xA848);
  51. extern pascal Fract FracCos(Fixed x)
  52.  ONEWORDINLINE(0xA847);
  53. extern pascal Fixed FixATan2(long x, long y)
  54.  ONEWORDINLINE(0xA818);
  55. #if defined(powerc) || defined(__powerc)
  56. extern wide *WideAdd(wide *target, const wide *source);
  57. extern short WideCompare(const wide *target, const wide *source);
  58. extern wide *WideNegate(wide *target);
  59. extern wide *WideShift(wide *target, long shift);
  60. extern unsigned long WideSquareRoot(const wide *source);
  61. extern wide *WideSubtract(wide *target, const wide *source);
  62. extern wide *WideMultiply(long multiplicand, long multiplier, wide *target);
  63.  
  64. /* returns the quotient */
  65.  
  66. extern long WideDivide(const wide *dividend, long divisor, long *remainder);
  67.  
  68. /* quotient replaces dividend */
  69.  
  70. extern wide *WideWideDivide(wide *dividend, long divisor, long *remainder);
  71. extern wide *WideBitShift(wide *src, long shift);
  72. #endif
  73.  
  74. #if defined(applec) && !defined(mc68881)
  75. extern pascal double_t Frac2X(Fract x)
  76.  ONEWORDINLINE(0xA845);
  77. extern pascal double_t Fix2X(Fixed x)
  78.  ONEWORDINLINE(0xA843);
  79. extern pascal Fixed X2Fix(double_t x)
  80.  ONEWORDINLINE(0xA844);
  81. extern pascal Fract X2Frac(double_t x)
  82.  ONEWORDINLINE(0xA846);
  83. #else
  84. #if 0
  85. extern pascal double_t Frac2X(Fract x);
  86. extern pascal double_t Fix2X(Fixed x);
  87. extern pascal Fixed X2Fix(double_t x);
  88. extern pascal Fract X2Frac(double_t x);
  89. #endif
  90. #endif
  91.  
  92. #ifdef __cplusplus
  93. }
  94. #endif
  95.  
  96. #endif
  97.  
  98.